<template>
	<view class="page">
		<view class="detail">
			<view class="title">{{info.title}}</view>
			<view class="read-item">
				<view class="time">{{info.time}}</view>
				<view class="count" v-if="info.count">阅读{{info.count}}</view>
			</view>
			<mp-html class="content" :content="info.content"></mp-html>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					id: null,
					title: '',
					content: '',
					count: 0,
					time: ''
				}
			}
		},
		methods: {

		},
		onShow() {
			uni.$on('bussinessDetail', data => {
				this.info = data;
			})
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		overflow: hidden;
		background: #fff;
		height: 100%;
		width: 100%;

		.detail {
			width: $content-width;
			margin: 30rpx auto;
			overflow: hidden;

			.title {
				font-weight: bold;
				margin: 30rpx 0;
				font-size: 34rpx;
			}

			.read-item {
				display: flex;
				align-items: center;
				color: #767676;
				font-size: 24rpx;
				margin-top: 20rpx;
				margin-bottom: 40rpx;

				.time {
					margin-right: 20rpx;
				}
			}

			.content {
				font-size: 28rpx;
				line-height: 50rpx;
				letter-spacing: 1px;

			}
		}
	}
</style>